import React from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import WithLoadable from '@/components/WithLoadable';

const Login = WithLoadable(() => import(/* webpackChunkName:'login'*/ '@/views/Login'));
const Dashboard = WithLoadable(() => import(/* webpackChunkName:'dashboard'*/ '@/Dashboard'));

const Router = () => {
	return (
		<HashRouter>
			<Switch>
				<Route path="/login" component={Login} />
				<Route render={() => {
					return <Dashboard></Dashboard>
				}} />
			</Switch>
		</HashRouter>
	);
};
export default Router;
